package puly.arr;

public class PolyArr2 {
    public static void main(String[] args) {
        Car car=new Sedan("BYD",4990,1500);
        Adult adult=new Adult("zhangsan");
        adult.adultDrive(car);
        Car car1=new Car("长城",5000,1750);
        Car car2=new Suv("哈弗",5000,1750);
        adult.adultDrive(car2);
        System.out.println(car2.getBrand());
        Road road=new FreeWay("广深高速",4,120);
        adult.drive2(car,road);
        System.out.println("________");
        Adult adult2=new Adult("lisi");
        Road road2=new UrbanExpressway("南环路",3,60);
        adult2.drive2(car2,road2);
        System.out.println("车道个数:"+road2.getLaneCount());
        adult2.adultDrive(car2);
        System.out.println(adult2.getClass());
        System.out.println("________");
        adult2.drive2(car1,road2);
    }
}
